import request from '@/utils/request.js'

export default {
    //添加
    add(data) {
        return request({
            url: '/v3/energy/dataItem/add',
            method: 'POST',
            data:{
                ...data,
                organizationNo:sessionStorage.organizationNo
            }
        })
    },
    //编辑
    edit(data) {
        return request({
            url: '/v3/energy/dataItem/edit',
            method: 'POST',
            data
        })
    },
    //分页查询
    queryPageByCondition(data) {
        return request({
            url: '/v3/energy/dataItem/queryPageByCondition',
            method: 'POST',
            data
        })
    },
    //编号批量删除接口
    delList(idList) {
        return request({
            url: `/v3/energy/dataItem/delListByDataItemId?idList=${idList}`,
            method: 'GET'
        })
    },
    //条件查询接口
    queryByCondition(data) {
        return request({
            url: '/v3/energy/dataItem/queryByCondition',
            method: 'POST',
            data:{
                ...data,
                organizationNo:sessionStorage.organizationNo
            }
        })
    },
    //设备关联区域接口
    bandEquipment(data) {
        return request({
            url: '/v3/energy/dataItem/bandEquipment',
            method: 'POST',
            data:{
                ...data,
                organizationNo:sessionStorage.organizationNo
            }
        })
    },
}
